﻿using System;
using System.Collections;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;
using System.Xml.Serialization;

namespace GMAC.ReportingSystem.Business.Entities.Configuration
{
    [Serializable]
    public class ConfigurationParameter
    {
        public string Key { get; set; }
        public string Description { get; set; }
        public Type DataType { get; set; }
        public object Value { get; set; }
        public short? Length { get; set; }
        public object MinValue { get; set; }
        public object MaxValue { get; set; }
    }

    [Serializable]
    public class ConfigurationParameterCollection : List<ConfigurationParameter>
    {
        public ConfigurationParameter GetValue(string key)
        {
            foreach (ConfigurationParameter parameter in this)
            {
                if (parameter.Key == key)
                {
                    return parameter;
                }
            }
            return null;
        }
    }
}
